﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Iacym.Entities;
using System.Data;
using System.Data.Objects;

namespace Iacym.Repository
{
    public class LibroImagenRepository : MasterRepository, ILibroImagenRepository
    {
        public LIBRO_IMAGEN GetLibroImagebById(int id)
        {
            var query = from c in context.LIBRO_IMAGEN
                        where c.LibroId.Equals(id)
                        select c;

            ObjectContext.Refresh(RefreshMode.StoreWins, query);

            return query.SingleOrDefault();
        }
    }
}
